<div class="container-fluid">
    <?php
//get item param from model
    $courses = $viewModel->get('courses');
    if (!is_object($courses)) {
        echo 'Courses is not exist!';
    } else {
        ?>
        
        <h1>Update form</h1>
        <form class="form-horizontal" method="POST">
            <div class="control-group" style="display: none;">
                <label class="control-label" for="inputCourseID">ID</label>
                <div class="controls">
                    <input type="text" id="inputCourseID" name="courses_id" value="<?php echo $courses->courses_id; ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputCourseName">Course Name</label>
                <div class="controls">
                    <input type="text" id="inputCourseName" name="courses_name" placeholder="Course Name" value="<?php echo $courses->courses_name ?>" required="required">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputKeywords">Keywords</label>
                <div class="controls">
                    <input type="text" id="inputKeywords" name="keyword"  value="<?php echo $courses->keyword ?>" placeholder="Keywords">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputDescription">Description</label>
                <div class="controls">
                    <textarea id="inputDescription" class="editor_noimage" name="description" placeholder="Description"  required="required" style="margin: 0px; height: 167px; width: 457px;"><?php echo $courses->description; ?></textarea>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputUsername">Status</label>
                <div class="controls">
                    <select name="status">
                        <option value="0" <?php echo ($courses->status == 0) ? "selected = 'selected'" : "" ?>>Deactive</option>
                        <option value="1" <?php echo ($courses->status == 1) ? "selected = 'selected'" : "" ?>>Active</option>
                    </select>
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <button type="submit" class="btn btn-success">Submit</button>
                    <button type="reset" class="btn">Reset</button>
                </div>
            </div>
        </form>
    <?php } ?>
</div>